import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Date;

public class TextException {
    public TextException() {
    }

    public static void main(String[] args) throws ParseException {
        /*DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        String str = "2021-12-12 09:30:12";*/
        /*LocalDateTime localDateTime = LocalDateTime.parse(str,dateTimeFormatter);*/
        /*System.out.println(localDateTime);*/
       /* Date date = dateTimeFormatter.parse(str);*/


/*        try {*/
            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            String str = "2028-12-12 12:00:00";
            Date date = simpleDateFormat.parse(str);
            System.out.println(date);
/*        } catch (ParseException e) {
            throw new RuntimeException(e);
        }*/


    }
}
